package top.haijunit.navi.auth.domain;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import top.haijunit.framework.validation.ValidChecks;
import top.haijunit.navi.auth.core.WorkConstant;

/**
 * 职位信息
 *
 * @author zhanghaijun
 * @since 2024-10-28
 */
@Data
@Schema(description = "职位信息")
public class PositionInfo {

    /**
     * 职位编码
     */
    @Schema(description = "职位编码", example = WorkConstant.DEFAULT_ID_STR)
    @NotBlank(message = "职位编码不能为空", groups = {ValidChecks.GroupEdit.class})
    @ExcelIgnore
    private String positionId;

    /**
     * 职位名称
     */
    @Schema(description = "职位名称", example = "首席技术官")
    @NotBlank(message = "职位名称不能为空")
    @Length(max = 16, message = "职位名称不能超过16个字符")
    @ExcelProperty(value = "职位名称", index = 1)
    private String positionName;

    /**
     * 职位别名
     */
    @Schema(description = "职位别名", example = "CTO")
    @NotBlank(message = "职位别名不能为空")
    @Length(max = 16, message = "职位别名不能超过16个字符")
    @ExcelProperty(value = "职位别名", index = 2)
    private String nickname;

    /**
     * 职位描述信息
     */
    @Schema(description = "职位描述信息", example = "负责公司技术方向和技术团队管理")
    @Length(max = 256, message = "职位描述信息不能超过256个字符")
    @ExcelProperty(value = "职位描述信息", index = 3)
    private String remarks;

    /**
     * 职位等级
     */
    @Schema(description = "职位等级", example = "1")
    @Min(value = 1, message = "职位等级不能小于1")
    @ExcelProperty(value = "职位等级", index = 4)
    private Integer positionLevel;

}

